package com.xuecheng.manage_course.exception;

import com.xuecheng.framework.exception.ExceptionCatch;
import com.xuecheng.framework.model.response.CommonCode;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.web.bind.annotation.ControllerAdvice;

/**
 * @author ShengJinFeng
 * @version V1.0
 * @ClassName CustomExceptionCatch
 * @Description (这里用一句话描述这个类的作用)
 * @date 2020/3/12 18:42
 * @since V1.0
 */
@ControllerAdvice
public class CustomExceptionCatch extends ExceptionCatch {

    static{
        //在这里加入一些基础的异常类型判断
        builder.put(AccessDeniedException.class, CommonCode.UNAUTHORISE);
    }
}
